/*
 * Lab05D.cpp
 * Description: Simple program to get started with the use of pointers
 *              and dynamic memory allocation.
 *
 *  Created on: Feb 27, 2014
 *      Author: Anthony Varghese
 */

#include <iostream>
using std::cout;
using std::endl;

int main(){
	int data;
	typedef int* IntPointer;

	IntPointer ip;

	ip = &data;

	data = 10;

	cout << "Ints and pointers:" << endl;
	cout << " data is " << data << endl;
	cout << " ip is "   << ip   << endl;

	/*
	int array[10] = {101, 22, 73, 42, 15, 68, 37, 84, 98, 134};
	ip = array;
	cout << "Array: " << endl;
	cout << " array is " << array << endl;
	cout << " ip is "   << ip   << endl;
	cout << " ip points to " << *ip << endl;
	*/
}
